package com.xuzimian.globaldemo.spring.springrpc.webservice;



import org.springframework.stereotype.Component;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 * 如果不添加@Component注解就需要改类实现SpringBeanAutowiringSupport父类，用来确保该类能获取spring管理的bean
 * @program: global-demo
 * @description: 一个webservice协议的服务
 * @author: xzm
 * @create: 2019-01-16 16:39
 **/
@Component
@WebService(targetNamespace="http://www.xuzmian.com",portName = "HelloServiceImplPort",serviceName = "SpringWebService")
public class SpringWebServiceImpl
/*
*   extends SpringBeanAutowiringSupport
*/
{
    @WebMethod
    //@Override
    public String doSomething(@WebParam(name="doing") String doing) {
        System.out.println(" : 有客户端在调用doSomething方法！");
        return "你好，我是远程服务器上发布的" + doing + "服务！";
    }
}
